package d1130.r214.stringdemo;

import java.util.Scanner;

public class Demo06Regx {
    public static void main(String[] args) {
        System.out.println("请输入用户");//长度至少是6，只允许数字和字母 \w 用户名不正确，给提示
        Scanner sc=new Scanner(System.in);
        String name=sc.next();
        //System.out.println(phone.matches("\\d{11}"));
        if(name.matches("\\w{6,}")){
            System.out.println("用户名格式符合要求");
        }else{
            System.out.println("用户名格式有误");
        }


        //System.out.println("n".matches("[a-z]"));
      /*  System.out.println("5".matches("[a-z]"));
        System.out.println("2");

       */
    }
}
